<HTML>
<HEAD>
<TITLE>ncftp(1) manual page</TITLE>
</HEAD>
<BODY bgcolor=white>
<p align="right">
<A HREF="#toc">Table of Contents</A><P>

<H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
<UL>
  <b>NcFTP</b> - Browser
program for the File Transfer Protocol
</UL>
<H2><A NAME="sect1" HREF="#toc1">Synopsis</A></H2>
<UL>
<P>
<B>ncftp</B> [<I>host</I>]<I></I> <P>
<B>ncftp</B> [<I>ftp://host.name/directory/</I>] 
 
</UL>
 
<H2><A NAME="sect2" HREF="#toc2">Description</A></H2>
 <P>
The purpose of <I>ncftp</I> is to provide a powerful and flexible
interface to the Internet standard <I>File Transfer Protocol</I>. It is intended
to replace the stock <I>ftp</I> program that comes with the system. <P>
Although the
program appears to be rather spartan, you'll find that <I>ncftp</I> has a wealth
of valuable performance and usage features. The program was designed with
an emphasis on usability, and it does as much as it can for you automatically
so you can do what you expect to do with a file transfer program, which
is transfer files between two interconnected systems. <P>
Some of the cooler
features include progress meters, filename completion, command-line editing,
background processing, auto-resume downloads, bookmarking, cached directory
listings, host redialing, working with firewalls and proxies, downloading
entire directory trees, etc., etc. <P>
The <I>ncftp</I> distribution comes with the
useful utility programs <I><I>ncftpget</I>(1)</I> and <I><I>ncftpput</I>(1)</I> which were designed
to do command-line FTP. In particular, they are very handy for shell scripts.
This version of <I>ncftp</I> no longer does command-line FTP, since the main <I>ncftp</I>
program is more of a browser-type program.</P>

<center>
<p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="5JS76LUNSD3HU">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</center>


<H3><A NAME="sect2a" HREF="#toc2a">Options</A></H3>
<P>
The  program allows you to specify a host or directory URL
on the command line.  This is a synonym for running  ncftp
and then using the open command.  A few command-line flags
are allowed with this mode:
<UL>
<table width=100%>
	<tr>
		<td width=50><B>-u</B> <I>XX</I></td>
		<td>Use username <I>XX</I> instead of anonymous.</td>
	</tr>
	<tr>
		<td width=50><B>-p</B> <I>XX</I></td>
		<td>Use password <I>XX</I> with the username.</td>
	</tr>
	<tr>
		<td width=50><B>-j</B> <I>XX</I></td>
		<td>Use account <I>XX</I> in supplement to the username and password (deprecated)</td>
	</tr>
	<tr>
		<td width=50><B>-P</B> <I>XX</I></td>
		<td>Use port number <I>XX</I> instead of the default FTP service port (21).</td>
	</tr>
</table>
</UL>
</P>

<H3><A NAME="sect3" HREF="#toc3">Introduction to the Command Shell</A></H3>

<P>
Upon running the program you are presented a command prompt where you type
commands to the program's shell. Usually you will want to open a remote filesystem
to transfer files to and from your local machine's filesystem. To do that,
you need to know the symbolic name of the remote system, or its <I>Internet
Protocol</I>  (IP) address. For example, a symbolic name might be ``typhoon.unl.edu,''
and its IP address could be ``129.93.33.24.'' To open a connection to that system,
you use the program's <I>open</I> command: 
<UL>
<PRE>open typhoon.unl.edu
open 129.93.33.24</PRE>  
</UL>
  <P>
Both of these try to open the machine called typhoon at the <I>University
of Nebraska</I>. Using the symbolic name is the preferred way, because IP addresses
may change without notice, while the symbolic names usually stay the same.
<P>
When you open a remote filesystem, you need to have permission. The <I>FTP
Protocol</I>'s authentication system is very similar to that of logging in to
your account. You have to give an account name, and its password for access
to that account's files. However, most remote systems that have anything
you might be interested in don't require an account name for use. You can
often get anonymous access to a remote filesystem and exchange files that
have been made publicly accessible. The program attempts to get anonymous
permission to a remote system by default. What actually happens is that
the program tries to use ``anonymous'' as the account name, and when prompted
for a password, uses your E-mail address as a courtesy to the remote system's
maintainer. You can have the program try to use a specific account also.
That will be explained later. <P>
After the <I>open</I> command completes successfully,
you are connected to the remote system and logged in. You should now see
the command prompt change to reflect the name of the current remote directory.
To see what's in the current remote directory, you can use the program's
<I>ls</I> and <I>dir</I> commands.  The former is terse, preferring more remote files
in less screen space, and the latter is more verbose, giving detailed information
about each item in the directory. <P>
You can use the program's <I>cd</I> command to
move to other directories on the remote system. The cd command behaves very
much like the command of the same name in the <I>Bourne</I> and <I>Korn</I> shell. <P>
The
purpose of the program is to exchange data with other systems. You can use
the program's  <I>get</I> command to copy a file from the remote system to your
local system: 
<UL>
<PRE>get README.txt</PRE>  
</UL>
  <P>
The program will display the progress of the transfer on the screen,
so you can tell how much needs to be done before the transfer finishes.
When the transfer does finish, then you can enter more commands to the
program's command shell. <P>
You can use the program's <I>put</I> command to copy a file
from your system to the remote system:
<UL>
<PRE>put something.tar</PRE>  
</UL>
  <P>
When you are finished using the remote system, you can open another one
or use the <I>quit</I> <P>
Before quitting, you may want to save the current FTP session's
settings for later. You can use the <I>bookmark</I> command to save an entry into
your $HOME/.ncftp/bookmarks file.  When you use the <I>bookmark</I> command, you
also specify a bookmark name, so the next time instead of opening the full
hostname you can use the name of the bookmark. A bookmark acts just like
one for your web browser, so it saves the remote directory you were in,
the account name you used, etc., and other information it learned so that
the next time you use the bookmark it should require as little effort from
you as possible. <P>
&nbsp;  
<H3><A NAME="sect4" HREF="#toc4">Command Reference</A></H3>
 
<pre>help</pre>
 
<DL>

<DD>The first command to know is <I>help</I>.
If you just type</DD>

</DL>

<UL>
  <UL>
    <pre>help</pre>
  </UL>
</UL>
 
<DL>

<UL>

<DT> from the command shell, the program prints the names of all of the
  supported commands. From there, you can get specific help for a command
by typing the command after, for example: </DT>
</UL>
</DL>

<UL>
  <UL>
    <pre>help open</pre>
  </UL>
</UL>
 
<DL>

<UL>

</UL>

<ul> prints information about the <i>open</i> command. </ul>

  <dd>&nbsp;</dd>
</DL>

<pre>ascii</pre>
 
<DL>

<DD> This command
sets the transfer type to ASCII text. This is useful for text-only transfers
because the concept of text files differs between operating systems. For
example on UNIX, a text file denotes line breaks with the linefeed character,
while on MS-DOS a line break is denoted by both a carriage return character
and a line feed character. Therefore, for data transfers that you consider
the data as text you can use <I>ascii</I> to ensure that both the remote system
and local system translate accordingly. The default transfer type that <I>ncftp</I>
uses is not ASCII, but straight binary.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>bgget, bgput</pre>
 
<DL>

<DD> These commands
correspond to the <I>get</I> and <I>put</I> commands explained below, except that they
do the job in the background. Normally when you do a <I>get</I> then the program
does the download immediately, and does not return control to you until
the download completes. The background transfers are nice because you can
continue browsing the remote filesystem and even open other systems. In
fact, they are done by a daemon process, so even if you log off your UNIX
host the daemon should still do your transfers. The daemon will also automatically
continue to retry the transfers until they finish. To tell when background
jobs have finished, you have to examine the <I>$HOME/.ncftp/spool/log</I> file,
or run the <I>jobs</I> command from within  <I>NcFTP</I>. </DD>

<dt>&nbsp;</dt>
<DD>Both the <I>bgget</I> and <I>bgput</I> commands
allow you to schedule when to do the transfers. They take a ``-@'' parameter,
whose argument is a date of the form YYYYMMDDhhmmss (four digit year, month,
day, hour, minute, second). For example, to schedule a download at 3 AM
on November 6, you could try:</DD>

</DL>

<UL>
  <UL>
    <pre>bgget -@ 19971106030000 /pub/idstuff/quake/q2_100.zip</pre>
    <pre>&nbsp;</pre>
  </UL>
</UL>
<pre>bgstart</pre>
 
<DL>

<DD> This command
tells <I>ncftp</I> to immediately start the background transfers you've requested,
which simply runs a copy of the <I>ncftpbatch</I> program which is responsible
for the background jobs. Normally the program will start the background
job as soon as you close the current site, open a new site, or quit the
program. The reason for this is because since so many users still use slow
dialup links that starting the transfers would slow things to a crawl,
making it difficult to browse the remote system. An added bonus of starting
the background job when you close the site is that <I>ncftp</I> can pass off that
open connection to the <I>ncftpbatch</I> program. That is nice when the site is
always busy, so that the background job doesn't have to wait and get re-logged
on to do its job.  </DD>

<DT>&nbsp;</DT>
</DL>

<pre>binary</pre>
 
<DL>

<DD> Sets the transfer type to raw binary, so that
no translation is done on the data transferred. This is the default anyway,
since most files are in binary.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>bookmark</pre>
 
<DL>

<DD> Saves the current session settings
for later use. This is useful to save the remote system and remote working
directory so you can quickly resume where you left off some other time.
The bookmark data is stored in your <I>$HOME/.ncftp/bookmarks</I> file.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>bookmarks</pre>
 
<DL>

<DD>
Lists the contents of your <I>$HOME/.ncftp/bookmarks</I> file in a human-readable
format. You can use this command to recall the bookmark name of a previously
saved bookmark, so that you can use the <I>open</I> command with it.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>cat</pre>
 
<DL>

<DD> Acts
like the ``/bin/cat'' <I>UNIX</I> command, only for remote files. This downloads the
file you specify and dumps it directly to the screen. You will probably
find the <I>page</I> command more useful, since that lets you view the file one
screen at a time instead of printing the entire file at once.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>cd</pre>
 
<DL>

<DD> Changes
the working directory on the remote host. Use this command to move to different
areas on the remote server. If you just opened a new site, you might be
in the root directory. Perhaps there was a directory called ``/pub/news/comp.sources.d''
that someone told you about. From the root directory, you could:</DD>

</DL>

<UL>
  <UL>
    <pre>cd pub
cd news
cd comp.sources.d</pre>
  </UL>
</UL>
 
<DL>

<UL>

<DT> or, more concisely, </DT>
</UL>
</DL>

<UL>
  <UL>
    <pre>cd /pub/news/comp.sources.d</pre>
  </UL>
</UL>
 
<DL>

<UL>

</UL>
<DD> Then, commands such as <I>get</I>, <I>put</I>, and <I>ls</I> could
be used to refer to items in that directory.&nbsp; Some shells in the <I>UNIX</I> environment
have a feature I like, which is switching to the previous directory. Like
those shells, you can do:</DD>

</DL>

<UL>
  <UL>
    <pre>cd -</pre>
  </UL>
  <p> to change to the last directory you were in.</p>
</UL>
<pre>&nbsp;</pre>
<pre>chmod</pre>
 
<DL>

<DD> Acts like the
``/bin/chmod'' <I>UNIX</I> command, only for remote files. However, this is not a standard
command, so remote FTP servers may not support it.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>close</pre>
 
<DL>

<DD> Disconnects you
from the remote server. The program does this for you automatically when
needed, so you can simply open other sites or quit the program without
worrying about closing the connection by hand.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>debug</pre>
 
<DL>

<DD> This command is mostly
for internal testing. You could type</DD>

</DL>

<UL>
  <UL>
    <pre>debug 1</pre>
  </UL>
</UL>
 
<DL>

<UL>

</UL>
<DD> to turn debugging mode on.&nbsp; Then you could see all messages between
the program and the remote server, and things that are only printed in
debugging mode. However, this information is also available in the <I>$HOME/.ncftp/trace</I>
file, which is created each time you run <I>ncftp</I>. If you need to report a
bug, send a <I>trace</I> file if you can.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>dir</pre>
 
<DL>

<DD> Prints a detailed directory listing.
It tries to behave like <I>UNIX</I>'s ``/bin/ls -l'' command. If the remote server seems
to be a <I>UNIX</I> host, you can also use the same flags you would with <I>ls</I>, for
instance</DD>

</DL>

<UL>
  <UL>
    <pre>dir -rt</pre>
  </UL>
</UL>
 
<DL>

<UL>

<DT> would try to act like </DT>
</UL>
</DL>

<UL>
  <UL>
    <pre>/bin/ls -lrt</pre>
  </UL>
  <p>would on <i>UNIX</i>.</p>
  <p>&nbsp;</p>
</UL>

</DL>

<pre>edit</pre>
 
<DL>

<DD> Downloads into a temporary file for editing on the local host,
then uploads the changed file back to the remote host.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>get</pre>
 
<DL>

<DD> Copies files from the current working
directory on the remote host to your machine's current working directory.
To place a copy of ``README'' and ``README.too'' in your local directory, you could
try:</DD>

</DL>

<UL>
  <UL>
    <p> get README README.too</p>
  </UL>
</UL>
 
<DL>

<UL>

<DT> You could also accomplish that by using a wildcard
expression, such as: </DT>
</UL>
</DL>

<UL>
  <UL>
    <pre>get README*</pre>
  </UL>
</UL>
 
<DL>

<DD> This command is similar to the behavior of other FTP programs' <I>mget</I> command. To retrieve a remote file but give it a different name on
your host, you can use the ``-z'' flag. This example shows how to download a
file called <I>ReadMe.txt</I> but name it locally as <I>README</I>:</DD>

</DL>

<UL>
  <UL>
    <pre>get -z ReadMe.txt README</pre>
  </UL>
</UL>
 
<DL>

<DD> The program tries to ``resume'' downloads by default.&nbsp; This means that if the remote FTP server lost the connection and was only
able to send 490 kilobytes of a 500 kilobyte file, you could reconnect
to the FTP server and do another <I>get</I> on the same file name and it would
get the last 10 kilobytes, instead of retrieving the entire file again.
There are some occasions where you may not want that behavior. To turn it
off you can use the ``-f'' flag. </DD>

<DT>&nbsp; </DT>
<DD>There are also times where you want to append
to an existing file. You can do this by using the ``-A'' flag, for example</DD>

</DL>

<UL>
  <UL>
    <pre>get -A log.11</pre>
  </UL>
</UL>
 
<DL>

<UL>

</UL>

<ul><P>would append to a file named ``log.11'' if it existed locally.

<p>Another thing you can do is delete a remote file after you download it.
This can be useful when a remote host expects a file to be removed when
it has been retrieved. Use the double-D flag, such as ``get&nbsp;-DD'' to do this. </ul>

<DT>&nbsp;
</DT>
<DD>The <I>get</I> command lets you retrieve entire directory trees, too. Although it may
not work with some remote systems, you can try ``get&nbsp;-R'' with a directory to
download the directory and its contents.  </DD>

<dt>&nbsp;</dt>

<DD>When using the ``-R'' flag, you can also use the ``-T'' flag to disable
automatic on-the-fly TAR mode for downloading whole directory trees.&nbsp;
  The program uses TAR whenever possible since this usually preserves symbolic links
  and file permissions. TAR mode can also result in faster transfers for directories containing many
  small files, since a single data connection can be used rather than an FTP
  data connection for each small file. The downside to using TAR is that it forces downloading of the whole directory,
  even if you had previously downloaded a portion of it earlier, so you may want to use this option if you want to resume downloading of a directory. </DD>
<dt>&nbsp;</dt>

</DL>

<pre>jobs</pre>
 
<DL>

<DD> Views the list of currently
executing <I>NcFTP</I> background tasks. This actually just runs  <I>ncftpbatch</I> -l
for you.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>lcd</pre>
 
<DL>

<DD> The <I>lcd</I> command is the first of a few ``l'' commands that work
with the local host. This changes the current working directory on the local
host. If you want to download files into a different local directory, you
could use <I>lcd</I> to change to that directory and then do your downloads.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>lchmod</pre>
 
<DL>

<DD>
Runs ``/bin/chmod'' on the local host.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>lls</pre>
 
<DL>

<DD> Another local command that comes
in handy is the <I>lls</I> command, which runs ``/bin/ls'' on the local host and displays
the results in the program's window. You can use the same flags with <I>lls</I>
as you would in your command shell, so you can do things like:</DD>

</DL>

<UL>
  <UL>
    <pre>lcd ~/doclls -lrt p*.txt</pre>
    <pre>&nbsp;</pre>
  </UL>
</UL>
<pre>lmkdir</pre>
 
<DL>

<DD> Runs ``/bin/mkdir'' on the local host.  </DD>

<dt>&nbsp;</dt>
</DL>

<tt>lookup</tt>

<UL>
<P>The program also has a built-in interface to the name service via the <I>lookup</I>
command. This means you can lookup entries for remote hosts, like:</P>
<UL>
<pre>lookup cse.unl.edu ftp.cs.unl.edu sphygmomanometer.unl.edu</pre>
</UL>
<P>prints:

<UL>

<pre>cse.unl.edu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;129.93.33.1
typhoon.unl.edu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;129.93.33.24
sphygmomanometer.unl.edu&nbsp;&nbsp;129.93.33.126</pre>

</UL>

<p> There is also a more detailed option, enabled with ``-v,'' i.e.: </p>
<UL>
<pre>lookup -v cse.unl.edu ftp.cs.unl.edu</pre>

</UL>

<p>prints:</p>
<UL>
<pre>cse.unl.edu:
&nbsp;&nbsp;&nbsp;&nbsp;Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cse.unl.edu
&nbsp;&nbsp;&nbsp;&nbsp;Address:&nbsp;&nbsp;129.93.33.1

ftp.cs.unl.edu:
&nbsp;&nbsp;&nbsp;&nbsp;Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;typhoon.unl.edu
&nbsp;&nbsp;&nbsp;&nbsp;Alias:&nbsp;&nbsp;&nbsp;&nbsp;<a href="ftp://ftp.cs.unl.edu">ftp.cs.unl.edu</a>
&nbsp;&nbsp;&nbsp;&nbsp;Address:&nbsp;&nbsp;129.93.33.24</pre>

</UL>

<p>You can also give <I>IP</I> addresses, so this would work too:</p>
<UL>
    <pre>lookup 129.93.33.24</pre>
</UL>
<p> prints: </p>
<UL>
<pre>typhoon.unl.edu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;129.93.33.24</pre>

</UL>

</UL>

<pre>lpage</pre>
 
<DL>

<DD> Views a local file one page at a time,
with your preferred $PAGER program.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>lpwd</pre>
 
<DL>

<DD> Prints the current local directory.
Use this command when you forget where you are on your local machine.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>lrename</pre>
 
<DL>

<DD>
Runs ``/bin/mv'' on the local host.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>lrm</pre>
 
<DL>

<DD> Runs ``/bin/rm'' on the local host.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>lrmdir</pre>
 
<DL>

<DD>
Runs ``/bin/rmdir'' on the local host.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>ls</pre>
 
<DL>

<DD> Prints a directory listing from the
remote system. It tries to behave like <I>UNIX</I>'s ``/bin/ls&nbsp;-CF'' command. If the remote
server seems to be a <I>UNIX</I> host, you can also use the same flags you would
with <I>ls</I>, for instance</DD>

</DL>

<UL>
  <UL>
    <pre>ls -rt</pre>
  </UL>
</UL>
 
<DL>

<UL>

<DT> would try to act like </DT>
</UL>
</DL>

<UL>
  <UL>
    <pre>/bin/ls -CFrt</pre>
  </UL>
</UL>
 
<DL>

<UL>
<P> would on <i>UNIX</i>.</p>
</UL>

<DD><I>ncftp </I>has a powerful built-in system for dealing
with directory listings. It tries to cache each one, so if you list the
same directory, odds are it will display instantly. Behind the scenes, <I>ncftp</I>
always tries a long listing, and then reformats it as it needs to. So even
if your first listing of a directory was a regular ``ls'' which displayed the
files in columns, your next listing could be ``ls&nbsp;-lrt'' and <I>ncftp</I> would still
use the cached directory listing to quickly display the information for
you!  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>mkdir</pre>
 
<DL>

<DD> Creates a new directory on the remote host. For many public
archives, you won't have the proper access permissions to do that.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>open</pre>
 
<DL>

<DD>
Establishes an FTP control connection to a remote host. By default, <I>ncftp</I>
logs in anonymously to the remote host. You may want to use a specific user
account when you log in, so you can use the ``-u'' flag to specify which user.
This example shows how to <I>open</I> the host ``bowser.nintendo.co.jp'' using the username
``mario:''</DD>

</DL>

<UL>
  <UL>
    <pre>open -u mario bowser.nintendo.co.jp</pre>
  </UL>

  <P>Here is a list of flags you can use with the open command:
<UL>
<table width=100%>
	<tr>
		<td width=50><B>-u</B> <I>XX</I></td>
		<td>Use username <I>XX</I> instead of anonymous.</td>
	</tr>
	<tr>
		<td width=50><B>-p</B> <I>XX</I></td>
		<td>Use password <I>XX</I> with the username.</td>
	</tr>
	<tr>
		<td width=50><B>-j</B> <I>XX</I></td>
		<td>Use account <I>XX</I> in supplement to the username and password (deprecated)</td>
	</tr>
	<tr>
		<td width=50><B>-P</B> <I>XX</I></td>
		<td>Use port number <I>XX</I> instead of the default FTP service port (21).</td>
	</tr>
</table>
</UL>

</UL>

<pre>page</pre>
 
<DL>

<DD> Browses a remote file one page
at a time, using your $PAGER program. This is useful for reading README's
on the remote host without downloading them first.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>pdir, pls</pre>
 
<DL>

<DD> These commands
are equivalent to <I>dir</I> and <I>ls</I> respectively, only they feed their output
to your pager. These commands are useful if the directory listing scrolls
off your screen.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>put</pre>
 
<DL>

<DD> Copies files from the  local host to the remote machine's
current working directory. To place a copy of ``xx.zip'' and ``yy.zip'' in the remote
directory, you could try:</DD>

</DL>

<UL>
  <UL>
    <pre>put xx.zip yy.zip</pre>
  </UL>
 
<DL>

<DT> You could also accomplish that by using a wildcard expression, such as:
</DT>
</DL>

  <UL>
    <pre>put *.zip</pre>
  </UL>
</UL>
 
<DL>

<DD> This command is similar to the behavior of other FTP programs' <I>mput</I> command. To send a remote file but give it a different name on your
host, you can use the ``-z'' flag. This example shows how to upload a file called
``ncftpd-2.0.6.tar.gz'' but name it remotely as ``NFTPD206.TGZ:''</DD>

</DL>

<UL>
  <UL>
    <pre>put -z ncftpd-2.0.6.tar.gz NFTPD206.TGZ</pre>
  </UL>
</UL>
 
<DL>

<DD> The program <I>does</I> not try to ``resume'' uploads
by default. If you do want to resume an upload, use the ``-z'' flag. </DD>

<DD>&nbsp; </DD>

<DD>There are
also times where you want to append to an existing remote file. You can
do this by using the ``-A'' flag, for example </DD>

</DL>

<UL>
  <UL>
    <pre>put -A log11.txt</pre>
  </UL>
</UL>
 
<DL>

<UL>
<p> would append to a file named ``log11.txt'' if it existed on
the remote server. </p>
</UL>

<DD>Another thing you can do is delete a local file after
you upload it. Use the double-D flag, such as ``put&nbsp;-DD'' to do this. </DD>

<DT>&nbsp; </DT>
<DD>The <I>put</I> command
lets you send entire directory trees, too. It should work on all remote
systems, so you can try ``put&nbsp;-R'' with a directory to upload the directory and
its contents.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>pwd</pre>
 
<DL>

<DD> Prints the current remote working directory. A portion
of the pathname is also displayed in the shell's prompt.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>quit</pre>
 
<DL>

<DD> Of course,
when you finish using the program, type <I>quit</I> to end the program (You could
also use <I>bye</I>, <I>exit</I>, or <I>^D</I>).  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>quote</pre>
 
<DL>

<DD> This can be used to send a direct <I>FTP</I>
Protocol command to the remote server. Generally this isn't too useful to
the average user.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>rename</pre>
 
<DL>

<DD> If you need to change the name of a remote file,
you can use the <I>rename</I> command, like:</DD>

</DL>

<UL>
  <UL>
    <pre>rename SPHYGMTR.TAR sphygmomanometer-2.3.1.tar</pre>
  </UL>
</UL>
<p>&nbsp;</p>
<pre>rhelp</pre>
 
<DL>

<DD> Sends a help request
to the remote server. The list of <I>FTP</I> Protocol commands is often printed,
and sometimes some other information that is actually useful, like how
to reach the site administrator.&nbsp; Depending on the remote server, you may
be able to give a parameter to the server also, like: </DD>

</DL>

<UL>
  <UL>
    <pre>rhelp NLST</pre>
  </UL>
</UL>
 
<DL>

<UL>

<DT> One server responded: </DT>
</UL>
</DL>

<UL>
  <UL>
    <pre>Syntax: NLST [ &lt;sp&gt; path-name ]</pre>
  </UL>
</UL>
 
<DL>

<DD>  </DD>

</DL>

<pre>rm</pre>
 
<DL>

<DD> If you need to delete a remote file
you can try the <I>rm</I> command. Much of the time this won't work because you
won't have the proper access permissions. This command doesn't accept any
flags, so you can't nuke a whole tree by using ``-rf'' flags like you can on
<I>UNIX</I>.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>rmdir</pre>
 
<DL>

<DD> Similarly, the <I>rmdir</I> command removes a directory. Depending
on the remote server, you may be able to remove a non-empty directory, so
be careful.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>set</pre>
 
<DL>

<DD> This lets you configure some program variables, which are
saved between runs in the <I>$HOME/.ncftp/prefs</I> file. The basic syntax is:</DD>

</DL>

<UL>
  <UL>
    <pre>set &lt;option&gt; &lt;value&gt;</pre>
  </UL>
</UL>
 
<DL>

<UL>

<DT> For example, to change the value you use for the anonymous
password, you might do: </DT>
</UL>
</DL>

<UL>
  <UL>
    <pre>set anon-password ncftp@example.com</pre>
  </UL>
</UL>
 
<DL>

<UL>
<p> See the <a href="#sect5"> next section</a> for a list of things
you change. </p>
</UL>

</DL>

<pre>show</pre>
 
<DL>

<DD> This lets you display program variables. You can do ``show&nbsp;all''
to display all of them, or give a variable name to just display that one,
such as:</DD>

</DL>

<UL>
  <UL>
    <pre>show anon-password</pre>
  </UL>
</UL>
 
<DL>

<DD>  </DD>

</DL>

<pre>site</pre>
 
<DL>

<DD> One obscure command you may have to use someday
is <I>site</I>. The <I>FTP</I> Protocol allows for ``site specific'' commands. These ``site'' commands
vary of course, such as:</DD>

</DL>

<UL>
  <UL>
    <pre>site chmod 644 README</pre>
  </UL>
</UL>
 
<UL>
<p> Actually, <I>ncftp</I>'s <I>chmod</I> command really does the
above. </p>

<p>Try doing one of these to see what the remote server supports, if
any: </p>
</UL>

<UL>
  <UL>
    <P><TT>rhelp SITE</TT>
    <BR><TT>site help</TT>
  </UL>
</UL>
 
<DL>

<DD>  </DD>

</DL>

<pre>type</pre>
 
<DL>

<DD> You may need to change transfer types during
the course of a session with a server. You can use the <I>type</I> command to do
this.  Try one of these:</DD>

</DL>

<UL>
  <UL>
    <pre>type ascii
type binary
type image</pre>
  </UL>
</UL>
 
<DL>

<DD> The <I>ascii</I> command is equivalent to ``type&nbsp;a'',
and the <I>binary</I> command is equivalent to ``type&nbsp;i'' and ``type&nbsp;b''.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>umask</pre>
 
<DL>

<DD> Sets the
process' <I>umask</I> on the remote server, if it has any concept of a umask, i.e.:</DD>

</DL>

<UL>
  <UL>
    <pre>umask 077</pre>
  </UL>
</UL>
 
<UL>
<p> However, this is not a standard command, so remote FTP servers may not support it.</p>
</UL>
<br>

<pre>version</pre>
 
<DL>

<DD> This command dumps some information about the
particular edition of the program you are using, and how it was installed
on your system.  </DD>
<dt>&nbsp;</dt>
</DL>

<H3><A NAME="sect5" HREF="#toc5">Variable Reference</A></H3>
  
<pre>anon-password</pre>
  
<DL>

<DD> Specifies what to use
for the password when logging in anonymously. Internet convention has been
to use your E-mail address as a courtesy to the site administrator. If you
change this, be aware that some sites require (i.e. they check for) valid
E-mail addresses.  </DD>

<dt>&nbsp;</dt>
</DL>
  
<pre>auto-ascii</pre>
  
<DL>

<DD> If set to a list of pipe-character delimited extensions, files with
these extensions will be sent in ASCII mode even if binary mode is
currently in effect.  This option allows you to transfer most files in
binary, with the exception of a few well-known file types that should be
sent in ASCII.  This option is enabled by default, and set to a list
of common extensions (e.g., <tt>.txt</tt> and <tt>.html</tt>).</DD>

<dt>&nbsp;</dt>
</DL>

<pre>auto-resume</pre>

<DL>
<DD>
<I>NcFTP</I> 3 now prompts the user by  default  when  you
try to download a file that already exists locally,
or upload a  file  that  already  exists  remotely.
Older versions of the program automatically guessed
whether to overwrite the existing file  or  attempt
to resume where it left off, but sometimes the program
would guess wrong.  If you would  prefer  that
the  program always guess which action to take, set
this variable to <i>yes</i>, otherwise, leave it set to <i>no</i>
and the program will prompt you for which action to
take.
</DD>
<dt>&nbsp;</dt>
</DL>

<pre>autosave-bookmark-changes</pre>
  
<DL>

<DD> With the advent of version 3 of
<I>NcFTP</I>, the program treats bookmarks more like they would with your web
browser, which means that once you bookmark the site, the remote directory
is static. If you set this variable to <I>yes</I>, then the program will automatically
update the bookmark's starting remote directory with the directory you were
in when you closed the site. This behavior would be more like that of <I>NcFTP</I>
version 2.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>confirm-close</pre>
  
<DL>

<DD> By default the program will ask you when a site
you haven't bookmarked is about to be closed. To turn this prompt off, you
can set this variable to <I>no</I>.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>connect-timeout</pre>
  
<DL>

<DD> Previous versions of the program
used a single timeout value for everything. You can now have different values
for different operations. However, you probably do not need to change these
from the defaults unless you have special requirements. </DD>

<DT>&nbsp; </DT>
<DD>The <I>connect-timeout</I>
variable controls how long to wait, in seconds, for a connection establishment
to complete before considering it hopeless. You can choose to not use a
timeout at all by setting this to -1.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>control-timeout</pre>
  
<DL>

<DD> This is the timer used
when <I>ncftp</I> sends an FTP command over the control connection to the remote
server. If the server hasn't replied in that many seconds, it considers the
session lost.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>logsize</pre>
  
<DL>

<DD> This is controls how large the transfer log ($HOME/.ncftp/log)
can grow to, in kilobytes. The default is 200, for 200kB; if you don't want
a log, set this to 0.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>pager</pre>
  
<DL>

<DD> This is the external program to use to view
a text file, and is <I>more</I> by default.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>passive</pre>
  
<DL>

<DD> This controls <I>ncftp</I>'s behavior
for data connections, and can be set to one of <I>on</I>, <I>off</I>, or the default,
<I>optional</I>. When passive mode is on, <I>ncftp</I> uses the FTP command primitive
<I>PASV</I> to have the client establish data connections to the server. The default
FTP protocol behavior is to use the FTP command primitive <I>PORT</I> which has
the server establish data connections to the client. The default setting
for this variable, <I>optional</I>, allows <I>ncftp</I> to choose whichever method it
deems necessary.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>progress-meter</pre>
  
<DL>

<DD> You can change how the program reports file
transfer status. Select from meter <I>2</I>, <I>1</I>, or <I>0</I>.  </DD>

<dt>&nbsp;</dt>

</DL>

<pre>redial-delay</pre>
  
<UL>
<P>When a host is busy or unavailable, the program waits this number of seconds before trying again.&nbsp;
  The smallest you can set this is to 10 seconds -- so if you were planning on being inconsiderate,
  think again.  </P>
</UL>

<pre>save-passwords</pre>
  
<DL>

<DD> If you set
this variable to <I>yes</I>, the program will save passwords along with the bookmarks
you save. While this makes non-anonymous logins more convenient, this can
be very dangerous since your account information is now sitting in the
$HOME/.ncftp/bookmarks file. The passwords aren't in clear text, but it is
still trivial to decode them if someone wants to make a modest effort. 
</DD>

<dt>&nbsp;</dt>
</DL>

<pre>show-status-in-xterm-titlebar</pre>
  
<DL>

<DD> If set to <I>yes</I> and operating from within an <i>xterm</i> window,
the program will change the window's titlebar accordingly.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>so-bufsize</pre>
  
<DL>

<DD> If your operating system supports <i> TCP Large Windows</i>, you can
try setting this variable to the number of bytes to set the TCP/IP socket
buffer to.  This option won't be of much use unless the remote server also
supports large window sizes and is pre-configured with them enabled.  </DD>

<dt>&nbsp;</dt>
</DL>

<pre>xfer-timeout</pre>
  
<DL>

<DD>
This timer controls how long to wait for data blocks to complete. Don't set
this too low or else your transfers will timeout without completing.  </DD>
<dt>&nbsp;</dt>
</DL>

<H3><A NAME="sect6" HREF="#toc6">Firewall
and Proxy Configuration</A></H3>
 <P>
You may find that your network administrator has
placed a firewall between your machine and the Internet, and that you cannot
reach external hosts. <P>
The answer may be as simple as setting <I>ncftp</I> to use
<I>passive</I> mode only, which you can do from a <I>ncftp</I> command prompt like this:
<UL>
<PRE>set passive yes</PRE>  
</UL>
  <P>
The reason for this is because many firewalls do not allow incoming connections
to the site, but do allow users to establish outgoing connections. A passive
data connection is established by the client to the server, whereas the
default is for the server to establish the connection to the client, which
firewalls may object to. Of course, you now may have problems with sites
whose primitive FTP servers do not support passive mode. <P>
Otherwise, if you
know you need to have <I>ncftp</I> communicate directly with a firewall or proxy,
you can try editing the separate <I>$HOME/.ncftp/firewall</I> configuration file.
This file is created automatically the first time you run the program,
and contains all the information you need to get the program to work in
this setup. <P>
The basics of this process are configuring a firewall (proxy)
host to go through, a user account and password for authentication on the
firewall, and which type of firewall method to use. You can also setup an
exclusion list, so that <I>ncftp</I> does not use the firewall for hosts on the
local network. <P>
&nbsp;  
<H2><A NAME="sect7" HREF="#toc7">Files</A></H2>
 
<UL>
 
<DL>

<DT><tt>$HOME/.ncftp/bookmarks</tt></DT>
<DD>Saves bookmark and host information.
</DD>

<DT><tt>$HOME/.ncftp/firewall</tt></DT>
<DD>Firewall access configuration file. </DD>

<DT><tt>$HOME/.ncftp/prefs</tt></DT>
<DD>Program
preferences. </DD>

<DT><tt>$HOME/.ncftp/trace</tt></DT>
<DD>Debugging output
for entire program run. </DD>

<DT><tt>$HOME/.ncftp/v3init</tt></DT>
<DD>Used to tell if this version of
the program has run before.  </DD>

<DT><tt>$HOME/.ncftp/spool/</tt></DT>
<DD>Directory where background jobs are stored
in the form of spool configuration files. </DD>

<DT><tt>$HOME/.ncftp/spool/log</tt></DT>
<DD>Information for background data
transfer processes. </DD>

</DL>

</UL>

<H2><A NAME="sect8" HREF="#toc8">Environment</A></H2>
 
<UL>
 
<DL>

<DT>PATH</DT>
<DD>User's search path, used to
find the <I>ncftpbatch</I> program, pager, and some other system utilities. </DD>

<DT>PAGER</DT>
<DD>Program
to use to view text files one page at a time. </DD>

<DT>TERM</DT>
<DD>If the program was compiled
with support for <I>GNU Readline</I> it will need to know how to manipulate the
terminal correctly for line-editing, etc. The pager program will also take
advantage of this setting. </DD>

<DT>HOME</DT>
<DD>By default, the program writes its configuration
data in a <I>.ncftp</I> subdirectory of the <I>HOME</I> directory. </DD>

<DT>NCFTPDIR</DT>
<DD>If set, the
program will use this directory instead of <I>$HOME/.ncftp</I>. This variable is
optional except for those users whose home directory is the root directory.
</DD>

<DT>COLUMNS</DT>
<DD>Both the built-in  <I>ls</I> command and the external <I>ls</I> command need this
to determine how many screen columns the terminal has.  </DD>
</DL>

</UL>

<H2><A NAME="sect9" HREF="#toc9">Bugs</A></H2>
<UL>
 <P>
There are no
such sites named <I>bowser.nintendo.co.jp</I> or <I>sphygmomanometer.unl.edu</I>. <P>
Auto-resume
should check the file timestamps instead of relying upon just the file
sizes, but it is difficult to do this reliably within FTP. <P>
Directory caching
and recursive downloads depend on <I>UNIX</I>-like behavior of the remote host. 
</UL>
 <P>
&nbsp;
 
<H2><A NAME="sect10" HREF="#toc10">Author</A></H2>
<UL>
 <P>
Mike Gleason, NcFTP Software.
</UL>
 <P>
&nbsp;  
<H2><A NAME="sect11" HREF="#toc11">See Also</A></H2>
<UL>
 <P>
<I><I>ncftpput</I>(1)</I>,
<I><I>ncftpget</I>(1)</I>, <I><I>ncftpbatch</I>(1)</I>, <I><I>ftp</I>(1)</I>, <I><I>rcp</I>(1)</I>, <I><I>tftp</I>(1)</I>. <P>
<I>LibNcFTP</I>  (<a href="http://www.ncftp.com/libncftp/">http://www.ncftp.com/libncftp</a>/).
<P>
<I>NcFTPd</I>  (<a href="http://www.ncftp.com/ncftpd/">http://www.ncftp.com/ncftpd/</a>).
</UL>
<P>
&nbsp;  
<H2><A NAME="sect12" HREF="#toc12">Thanks</A></H2>
<UL>
 <P>
Thanks to everyone who uses
the program. Your support is what drives me to improve the program! <P>
I thank
Dale Botkin and Tim Russell at my former ISP, <I>Probe Technology</I>. <P>
Ideas and
some code contributed by my partner, Phil Dietz. <P>
Thanks to Brad Mittelstedt
and Chris Tjon, for driving and refining the development of the backbone
of this project, <I>LibNcFTP</I>. <P>
I'd like to thank my former system administrators,
most notably Charles Daniel, for making testing on a variety of platforms
possible, letting me have some extra disk space, and for maintaining the
UNL FTP site. <P>
For testing versions 1 and 2 above and beyond the call of
duty, I am especially grateful to: Phil Dietz, Kok&nbsp;Hon&nbsp;Yin, and Andrey&nbsp;A.&nbsp;Chernov
(ache@astral.msk.su). <P>
Thanks to Tim MacKenzie (t.mackenzie@trl.oz.au) for the
original filename completion code for version 2.3.0 and 2.4.2. <P>
Thanks to DaviD
W. Sanderson (dws@ora.com), for helping me out with the man page. <P>
Thanks to
those of you at <a href="http://www.unl.edu"> UNL</a> who appreciate my work. <P>
Thanks to Red Hat Software for
honoring my licensing agreement, but more importantly, thanks for providing
a solid and affordable development platform. 
</UL>
 <P>
&nbsp;  
<H2><A NAME="sect13" HREF="#toc13">Apologies</A></H2>
<UL>
 <P>
To the users, for
not being able to respond personally to most of your inquiries. <P>
To Phil,
for things not being the way they should be. 
</UL>
 <P>

<HR><P>
<A NAME="toc"><B>Table of Contents</B></A>
<UL>
<LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
<LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
<LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
<UL>
<LI><A NAME="toc3" HREF="#sect3">Introduction to the Command Shell</A></LI>
<LI><A NAME="toc4" HREF="#sect4">Command Reference</A></LI>
<LI><A NAME="toc5" HREF="#sect5">Variable Reference</A></LI>
<LI><A NAME="toc6" HREF="#sect6">Firewall and Proxy Configuration</A></LI>
</UL>
<LI><A NAME="toc7" HREF="#sect7">Files</A></LI>
<LI><A NAME="toc8" HREF="#sect8">Environment</A></LI>
<LI><A NAME="toc9" HREF="#sect9">Bugs</A></LI>
<LI><A NAME="toc10" HREF="#sect10">Author</A></LI>
<LI><A NAME="toc11" HREF="#sect11">See Also</A></LI>
<LI><A NAME="toc12" HREF="#sect12">Thanks</A></LI>
<LI><A NAME="toc13" HREF="#sect13">Apologies</A></LI>
</UL>
</BODY></HTML>
